home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / rtextu10.zip / CUT.DOC next >
Text File  |  1993-05-06  |  5KB  |  136 lines

  1.  
  2.  
  3.                              #####                 
  4.                             #     #  #    #   #####
  5.                             #        #    #     #  
  6.                             #        #    #     #  
  7.                             #        #    #     #  
  8.                             #     #  #    #     #  
  9.                              #####    ####      #  
  10.  
  11.  
  12.  
  13.  
  14. You can get part of the following documentation by invoking the program with
  15. the switches -v, -h, or -H . See README.TXT for more information.
  16.  
  17. -----------------------------------   -v   ------------------------------------
  18. CUT v1.0 -- Remove selected fields from each line of a file
  19. Copr (c) 1992,1993 Richard Breuer. CUT is freeware. No warranties.
  20.  
  21. This is CUT/2 v1.0 - renamed to CUT (from RUTILS 4).
  22.  
  23. Author: Richard Breuer
  24.         Brunssumstrasse 6
  25.         5100 Aachen
  26.         (after Jul 1, 1993: 52074 Aachen)
  27.         Germany
  28.         Europe
  29.  
  30. Phone:  +49/241/85605
  31. Fax:    +49/241/8021329
  32.  
  33. Email:  ricki@pool.informatik.rwth-aachen.de (Preferred!)
  34.  
  35. -----------------------------------   -h   ------------------------------------
  36. CUT v1.0 -- Remove selected fields from each line of a file
  37. Copr (c) 1992,1993 Richard Breuer. CUT is freeware. No warranties.
  38.  
  39. Usage:
  40.    CUT [-hHnuv*] -c<list> infile.. [{>|>>} outfile]
  41.    CUT [-hHnuv*] -f<list> [-d<c>] [-s] infile.. [{>|>>} outfile]
  42.  
  43. Options:
  44.    -c<list> Remove by character position. list is a comma-separated list of
  45.             integer field numbers, with an optional - to indicate ranges
  46.    -d<c>    Set the field delimiter to c. The default is a TAB
  47.    -f<list> Remove by field position. Instead of character positions, list
  48.             specifies fields separated with a delimiter (default is a TAB)
  49.    -h       Display this help screen
  50.    -H       Display another help screen with notes and examples
  51.    -i       Inverse the meaning of -c and -f. Remove all BUT the given columns
  52.             or fields
  53.    -s       Suppress lines with no delimiter characters
  54.    -v       Display version info and information about the author
  55.    -*       Display internal information (for debugging purposes)
  56.  
  57. -----------------------------------   -H   ------------------------------------
  58. CUT v1.0 -- Remove selected fields from each line of a file
  59. Copr (c) 1992,1993 Richard Breuer. CUT is freeware. No warranties.
  60.  
  61. Notes:
  62.    CUT reads from stdin if a filename is -. The output is always directed
  63.    to stdout. The line lengths are restricted to 255 characters. Longer lines
  64.    will be cut. The errorlevel is set to 1 if help has been displayed. It is
  65.    set to 255 in case of an error and 0 on normal completion. Output resulting
  66.    from multiple input files is appended to stdout. The processing order for
  67.    wildcards depends on the order of the directory entries. CUT returns
  68.    nonsense for binary files.
  69.  
  70. Examples:
  71.    DIR | CUT -f1 -d' '
  72.       Display the directory without filenames. Useful, hey?
  73.    DIR | CUT -i -f1 -d' '
  74.       Display only the filenames of the directory.
  75.    CUT -c1-10,4-5,40,20-29,50- TABLE.DAT > STRIP.DAT
  76.       Deletes columns 1..10, 20..29, 40, and  50ff from the file TABLE.DAT and
  77.       places the result in STRIP.DAT. Note that the columns need not be sorted,
  78.       and that ranges may overlap each other (in the above example 4-5 is a
  79.       subrange of 1-10).
  80.  
  81. -------------------------------------------------------------------------------
  82. Additional information:
  83.    CAT is a re-implementation of the Unix command with the same name. It should
  84.    behave nearly the same way. A difference is the handling of column or field
  85.    lists. This CAT can handle field ranges which overlap each other. Besides,
  86.    they don't need to be sorted.
  87.  
  88. Examples:
  89.   Consider the input file FOO.DAT:
  90.        >banner.pas       4675  10.02.93  20.52<
  91.        >genout.pas      10782  10.02.93  16.09<
  92.        >hd.pas           6908  10.02.93  16.09<
  93.        >head.pas         3933  10.02.93  16.09<
  94.        >nc.pas           8416  10.02.93  16.09<
  95.        >nodup.pas        4185  10.02.93  16.09<
  96.        >strings2.pas     7384  10.02.93  16.09<
  97.        >t.pas              53   8.02.93  12.06<
  98.        >tee.pas          4914  10.02.93  16.09<
  99.        >upcase.pas       4638  10.02.93  16.09<
  100.        >wc.pas           5536  10.02.93  16.09<
  101.  
  102.    CUT -f1 -d' ' FOO.DAT will produce
  103.        >4675  10.02.93  20.52<
  104.        >10782  10.02.93  16.09<
  105.        >6908  10.02.93  16.09<
  106.        >3933  10.02.93  16.09<
  107.        >8416  10.02.93  16.09<
  108.        >4185  10.02.93  16.09<
  109.        >7384  10.02.93  16.09<
  110.        >53   8.02.93  12.06<
  111.        >4914  10.02.93  16.09<
  112.        >4638  10.02.93  16.09<
  113.        >5536  10.02.93  16.09<
  114.  
  115.    CUT -c1-13 FOO.DAT will produce
  116.        >    4675  10.02.93  20.52<
  117.        >   10782  10.02.93  16.09<
  118.        >    6908  10.02.93  16.09<
  119.        >    3933  10.02.93  16.09<
  120.        >    8416  10.02.93  16.09<
  121.        >    4185  10.02.93  16.09<
  122.        >    7384  10.02.93  16.09<
  123.        >      53   8.02.93  12.06<
  124.        >    4914  10.02.93  16.09<
  125.        >    4638  10.02.93  16.09<
  126.        >    5536  10.02.93  16.09<
  127.  
  128.    CUT -sf1 -do FOO.DAT will produce
  129.        >ut.pas      10782  10.02.93  16.09<
  130.        >dup.pas        4185  10.02.93  16.09<
  131.  
  132.        This is so, because (1) these are the only lines containing the
  133.        separator 'o' and (2) -s suppresses all lines which do NOT contain this
  134.        character.
  135.  
  136.